﻿namespace Zhp.Model.Design
{
    public class DesignTableModel
    {
        /// <summary>
        /// 表名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 表描述
        /// </summary>
        public string Description { get; set; }
    }

    public class DesignTableEdit
    {
        public string Name { get; set; }

        public string Description { get; set; }

        public List<DesignColumnModel> ColumnList { get; set; }
    }

    public class DesignColumnModel
    {
        public string ColumnName { get; set; }

        public string OldColumnName { get; set; }

        public string DataType { get; set; }

        public int? Length { get; set; }

        public int? DecimalDigits { get; set; }

        public string ColumnDescription { get; set; }

        public bool IsNullable { get; set; }

        public bool IsPrimarykey { get; set; }
    }

    public class DesignTableRename
    {
        public string OldTableName { get; set; }
        public string NewTableName { get; set; }
    }


    public class DesignColumnDataType
    {
        /// <summary>
        /// 数据库类型
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// C#类型
        /// </summary>
        public string Type { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
    }
}
